//
//  ShopCell.m
//  瀑布流
//
//  Created by imac on 15/9/10.
//  Copyright (c) 2015年 刘强强. All rights reserved.
//

#import "ShopCell.h"
#import "ShopMode.h"
#import "UIImageView+WebCache.h"

@interface ShopCell ()


/**
 *  图片
 */


@end

@implementation ShopCell

- (void)awakeFromNib {

}

-(void)setShopMode:(ShopMode *)shopMode{
    _shopMode = shopMode;

    [self _settingData];
    
}


-(void)_settingData {
    
    [_imgView setImageWithURL:[NSURL URLWithString:_shopMode.img] placeholderImage:[UIImage imageNamed:@"loading"]];

    _priceLabel.text = _shopMode.price;
    
//    NSDictionary *item = [shopArr objectAtIndex:indexPath.row];
//    NSString *imgURL = [[item valueForKey:@"albums"] lastObject];
//    
//    _priceLabel.text = [item valueForKey:@"title"];
//    
//    [_imgView sd_setImageWithURL:[NSURL URLWithString:imgURL] placeholderImage:[UIImage imageNamed:@"1"]];
}
-(void)setDish:(DishesMadels *)dish
{
    self.priceLabel.text = dish.title;
    [self.imgView sd_setImageWithURL:[NSURL URLWithString:[dish.albums lastObject]] placeholderImage:[UIImage imageNamed:@"1"]];
}

@end
